package com.zjw.remotecall.call;

import android.util.Log;

import com.zjw.remotecall.streamacceptor.RemoteCallResult;


/**
 * @author ：zhong.jw
 * @date ：Created in 2022/10/17 13:24
 */
@SuppressWarnings("unchecked")
abstract class RemoteWithIt extends IRemoteWithIt.Stub {
    /**
     * Construct the stub at attach it to the interface.
     *
     * @param descriptor:唯一描述符
     */
    public RemoteWithIt(String descriptor) {
        super(descriptor);
    }

    @Override
    public void onWith(RemoteCallResult it) {
        try {
            onResult(it);
        } catch (Exception e) {
            Log.e("RemoteWithIt", "RemoteWithIt.onWith", e);
        }
    }

    public abstract void onResult(RemoteCallResult t);
}

